This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| print 5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Main where | |
| import System.Environment(getArgs) | |
| import qualified Prime | |
| main :: IO () | |
| main = do | |
| a <- getArgs | |
| Prime.main (a !! 0) (read (a !! 1)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {-# LANGUAGE TemplateHaskell #-} | |
| module LibTest where | |
| import Language.Haskell.TH.Ppr (pprint) | |
| import Language.Haskell.TH.Syntax (runQ, Lit(StringL), reify) | |
| import Language.Haskell.TH.Lib (litE) | |
| import Monad (liftM) | |
| import Data.Typeable (typeOf) | |
| import Language.Haskell.TH.Syntax (Q, Exp) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {-# LANGUAGE TemplateHaskell #-} | |
| module H where | |
| import Language.Haskell.TH | |
| f = [42] | |
| $(do | |
| i <- reify (mkName "f") | |
| runIO (print i) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def showA0() | |
| puts self.class | |
| puts @a | |
| end | |
| class B | |
| def showA(t) | |
| @a = t | |
| showA0() | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {-# LANGUAGE TemplateHaskell, ViewPatterns #-} | |
| module AccessorTemplateExpr where | |
| import Language.Haskell.TH (reify, runIO, Info(TyConI), Dec(DataD), ppr, Con(NormalC, RecC), newName, | |
| tupE, appE, lamE, varE, conE, | |
| conP, varP, wildP) | |
| import Data.Accessor.Basic (fromSetGet) | |
| makeAccessors typeName = do | |
| info <- reify typeName |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| parseExprControl = | |
| do { | |
| label <- try (do { l <- p_name; p_eq [Spec ":"]; return l}) | |
| ; e <- parseExprControl | |
| ; return (Label label e) | |
| } | |
| <|> do { | |
| try (p_eq [Spec "def"]) | |
| ; name <- p_name | |
| ; p_eq [Spec "="] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module IOFrontend where | |
| import qualified Control.Monad.IO.Class as MIO | |
| import qualified Data.Aeson as A | |
| import qualified Data.Attoparsec as AP | |
| import qualified Data.ByteString.Lazy as BSL | |
| import qualified Data.Enumerator as E | |
| import qualified Data.Enumerator.Binary as EB | |
| import qualified Data.Enumerator.List as EL | |
| import qualified GHC.IO.Handle as GIO |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| KBD RU2 "Russian Phonetic" | |
| COPYRIGHT "(c) 2011 " | |
| COMPANY "Max" | |
| LOCALEID "00000419" | |
| VERSION 1.0 |
OlderNewer