blob: 19ad3dd58ea0ca62ac6f11e9e77a43585698da48 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
|
{-# LANGUAGE TemplateHaskell #-}
module Main where
import Control.Monad (unless)
import Lib (value)
import Language.Haskell.TH
val = $(value)
main = unless (val == 42)
$ error $ "Incorrect lib value. Got " <> show val
|