code stringlengths 5 1.03M | repo_name stringlengths 5 90 | path stringlengths 4 158 | license stringclasses 15
values | size int64 5 1.03M | n_ast_errors int64 0 53.9k | ast_max_depth int64 2 4.17k | n_whitespaces int64 0 365k | n_ast_nodes int64 3 317k | n_ast_terminals int64 1 171k | n_ast_nonterminals int64 1 146k | loc int64 -1 37.3k | cycloplexity int64 -1 1.31k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
{-# LANGUAGE BangPatterns #-}
--
-- The Computer Language Benchmarks Game
-- http://benchmarksgame.alioth.debian.org/
--
-- Contributed by Don Stewart
-- Parallelized by Louis Wasserman
import System.Environment
import Control.Monad
import System.Mem
import Data.Bits
import Text.Printf
import GHC.Conc
--
-- an artifi... | beni55/ghcjs | test/nofib/shootout/binary-trees/Main.hs | mit | 1,919 | 6 | 13 | 518 | 730 | 381 | 349 | 48 | 2 |
-- Test purpose:
--
-- Ensure the plural "s" in warnings is only shown if there are more than
-- one entries
{-# OPTIONS_GHC -Wredundant-constraints #-}
{-# OPTIONS_GHC -Wtype-defaults #-}
module PluralS () where
-- Defaulting type classes
defaultingNum = 123 `seq` ()
defaultingNumAndShow = show 123
-- Redund... | ezyang/ghc | testsuite/tests/warnings/should_compile/PluralS.hs | bsd-3-clause | 478 | 0 | 6 | 90 | 104 | 62 | 42 | 9 | 1 |
-- Test for #1617
module T1617 where
import Prelude ()
import Control.Monad (mplus)
import qualified Control.Monad (mplus)
| urbanslug/ghc | testsuite/tests/ghci/scripts/ghci027_1.hs | bsd-3-clause | 123 | 0 | 5 | 17 | 32 | 21 | 11 | 4 | 0 |
-- !!! tests calls of `error' (that make calls of `error'...)
--
main = error ("1st call to error\n"++(
error ("2nd call to error\n"++(
error ("3rd call to error\n"++(
error ("4th call to error\n"++(
error ("5th call to error\n"++(
error ("6th call to error"
)))))))))))
| sdiehl/ghc | testsuite/tests/codeGen/should_run/cgrun016.hs | bsd-3-clause | 313 | 0 | 26 | 87 | 79 | 43 | 36 | 6 | 1 |
-- Copyright (c) Microsoft. All rights reserved.
-- Licensed under the MIT license. See LICENSE file in the project root for full license information.
{-|
Copyright : (c) Microsoft
License : MIT
Maintainer : adamsap@microsoft.com
Stability : alpha
Portability : portable
The module exports the built-in code g... | upsoft/bond | compiler/src/Language/Bond/Codegen/Templates.hs | mit | 1,705 | 0 | 5 | 400 | 140 | 108 | 32 | 20 | 0 |
module Hircules.Directories (
-- dirname, basename,
makeDirectory)
where
import Control.Monad (unless)
import System.Directory (createDirectory, doesDirectoryExist)
--import System.FilePath
-- dirname :: FilePath -> FilePath
-- dirname = joinSegments . init . p... | juhp/hircules | src/Hircules/Directories.hs | mit | 909 | 0 | 11 | 234 | 108 | 63 | 45 | 9 | 1 |
module Data.PackedSet where
import qualified Data.Set as ST
import qualified Data.Map as MP
data PackedSet a = PackedSet
-- Total number of elements, including interval elements.
{ psSize :: Int
-- Primary interval ends.
, psPrimaryIv :: (a,a)
-- Lower end of all ... | adizere/nifty-sets | src/Data/PackedSet.hs | mit | 5,293 | 0 | 10 | 1,573 | 1,017 | 579 | 438 | 75 | 4 |
module JSError
( JSError (..)
, ThrowsError
, IOThrowsError
, liftThrows
, throwError
, liftIO
, runExceptT
) where
import Control.Monad.Except
import JSEntity (JSExpression, JSStatement, JSVal)
import Text.Megaparsec.Error (ParseError)
data JSError = NumArgs Intege... | li-zhirui/JSAnalyzer | JSError.hs | mit | 1,950 | 0 | 13 | 615 | 470 | 257 | 213 | 56 | 1 |
module Simulation.Node
( Node (endpoints, counter)
, Hostname
, Port
, Simulation.Node.create
, createEndpoint
, removeEndpoint
, activateHttpServices
, as
) where
import Control.Applicative ((<$>), (<*>))
import Control.Concurrent.Async (Async, async)
imp... | kosmoskatten/programmable-endpoint | src/Simulation/Node.hs | mit | 2,503 | 0 | 12 | 586 | 725 | 394 | 331 | 69 | 2 |
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE UndecidableInstances #-}
module Betfair.APING.Types.TimeRange
( TimeRange(..... | joe9/betfair-api | src/Betfair/APING/Types/TimeRange.hs | mit | 801 | 0 | 9 | 185 | 129 | 80 | 49 | 19 | 0 |
module Main where
import Solidran.Lexf.Detail
main :: IO ()
main = do
alphabet <- (getLine >>= (return . filter (/= ' ')))
n <- (getLine >>= (return . read))
mapM_ (putStrLn) $ getAlphabetStrings n alphabet
| Jefffrey/Solidran | src/Solidran/Lexf/Main.hs | mit | 234 | 0 | 13 | 62 | 92 | 49 | 43 | 7 | 1 |
module HttpStuff where
import Data.ByteString.Lazy hiding (map)
import Network.Wreq
urls :: [String]
urls = [ "http://httpbin.com/ip"
, "http://httpbin.com/bytes/g"
]
mappingGet :: [IO (Response ByteString)]
mappingGet = map get urls
-- better than the above
traversedUrls :: IO [Response Byte... | NickAger/LearningHaskell | HaskellProgrammingFromFirstPrinciples/Chapter21.hsproj/HttpStuff.hs | mit | 365 | 0 | 8 | 74 | 92 | 53 | 39 | 10 | 1 |
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
module Main where
import Control.Applicative ((<$>), (<*>))
import Control.Monad
import Control.Monad... | Philonous/d-bus | tests/Main.hs | mit | 10,373 | 0 | 30 | 3,296 | 3,043 | 1,552 | 1,491 | 214 | 2 |
import System.IO
import System.Process
main = do
(_, Just hout, Just herr, jHandle) <-
-- Replace with some other command on Windows
createProcess (proc "/bin/date" args)
{ cwd = Just "."
, std_out = CreatePipe
, std_err = CreatePipe
}
where a... | tjakway/blackjack-simulator | main/ErrorFilter.hs | mit | 329 | 0 | 11 | 121 | 85 | 47 | 38 | -1 | -1 |
module Utils.List
( takeWhileInclusive,
listToInt ) where
-- Same as take while, but includes the element that we terminate on.
-- E.g. takeWhileInclusive (/=3) [1,2,3,4] -> [1,2,3]
takeWhileInclusive :: (a -> Bool) -> [a] -> [a]
takeWhileInclusive _ [] = []
takeWhileInclusive p (x:xs) = x : if p x then takeWhi... | daniel-beard/projecteulerhaskell | Problems/Utils/list.hs | mit | 581 | 1 | 8 | 177 | 146 | 83 | 63 | 9 | 2 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
-- | Common handler functions.
module Handler.Common where
import Data.FileEmbed... | rgrempel/frelm.org | src/Handler/Common.hs | mit | 5,102 | 0 | 20 | 1,750 | 1,006 | 514 | 492 | 104 | 5 |
module Geometry.Polygon where
import Algebra.Matrix as M
import Algebra.Vector as V
import Control.Exception.Base
import qualified Data.Graph.Extensions as Graph
import Data.List as List
import Data.List.Extensions as ListExt
import Data.Map as Map
import Data.Maybe as Maybe
import Data.Ratio as Ratio
import Data.Set ... | stevedonnelly/haskell | code/Geometry/Polygon.hs | mit | 9,621 | 0 | 23 | 1,614 | 3,592 | 1,975 | 1,617 | 149 | 1 |
{-# LANGUAGE GADTs #-}
{-# OPTIONS_GHC -fno-do-lambda-eta-expansion #-}
module Text.Regex.Applicative.Compile (compile) where
import Control.Monad.Trans.State
import Text.Regex.Applicative.Types
import Control.Applicative
import Data.Maybe
import qualified Data.IntMap as IntMap
compile :: RE s a -> (a -> [Thread s r]... | mitchellwrosen/regex-applicative | Text/Regex/Applicative/Compile.hs | mit | 4,683 | 0 | 23 | 1,670 | 1,512 | 763 | 749 | 105 | 10 |
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE PartialTypeSignatures #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
module Problem08 (partA, partB) where
import Data.List
import Control.Lens
import Text.Megaparsec hiding (State)
import Text.Megaparsec.Strin... | edwardwas/adventOfCodeTwo | src/Problem08.hs | mit | 2,697 | 0 | 14 | 573 | 963 | 499 | 464 | -1 | -1 |
module Play where
import Types
import Wave
import Control.Exception
import qualified Data.Vector.Unboxed as V
import Prelude hiding (catch)
import Sound.Sox.Play as Play
import Sound.Sox.Signal.List as SignalList
import Sound.Sox.Option.Format as Option
import System.Exit
play :: FrameStream -> IO ()
play audio = do... | garncarz/synth-haskell | Play.hs | gpl-2.0 | 527 | 2 | 12 | 75 | 168 | 97 | 71 | 16 | 1 |
module SMCDEL.Examples.Prisoners where
import Data.HasCacBDD hiding (Top,Bot)
import SMCDEL.Explicit.S5
import SMCDEL.Internal.TexDisplay
import SMCDEL.Language
import SMCDEL.Symbolic.S5
n :: Int
n = 3
light :: Form
light = PrpF (P 0)
-- P 0 -- light is on
-- P i -- agent i has been in the room (and switched on th... | jrclogic/SMCDEL | src/SMCDEL/Examples/Prisoners.hs | gpl-2.0 | 3,793 | 0 | 18 | 894 | 1,474 | 811 | 663 | 73 | 1 |
{- |
Module : $Header$
Description : Maude Morphisms
Copyright : (c) Martin Kuehl, Uni Bremen 2008-2009
License : GPLv2 or higher, see LICENSE.txt
Maintainer : mkhl@informatik.uni-bremen.de
Stability : experimental
Portability : portable
Definition of morphisms for Maude.
-}
module Maude.Morphis... | nevrenato/Hets_Fork | Maude/Morphism.hs | gpl-2.0 | 12,498 | 0 | 15 | 3,161 | 3,360 | 1,767 | 1,593 | 247 | 5 |
{-# LANGUAGE OverloadedStrings #-}
module Config where
import Data.Configurator
import Data.Configurator.Types (Value (..),Configured (..))
import System.IO.Unsafe
data List a = L [a]
instance Configured a => Configured (List a) where
convert (List vs) = L <$> traverse convert vs
convert _ = Nothing
antiQuote... | jyp/MarXup | Config.hs | gpl-2.0 | 653 | 0 | 13 | 117 | 230 | 126 | 104 | 16 | 1 |
-- | Non-annotating type checker.
module TypeChecker where
--import qualified Data.Map as M
import AbsCPP
import PrintCPP
import ErrM
import BuiltIns
import Environment
typecheck :: Program -> Err () -- Program
typecheck (Prog defs) = do
env <- buildFunTable emptyEnvT (defs ++ builtInFunctions)
... | izimbra/PLT2014 | Lab2/TypeChecker.hs | gpl-2.0 | 7,120 | 0 | 19 | 3,202 | 1,887 | 887 | 1,000 | 120 | 27 |
--CRITICAL: Genomes are currently not compiled as safe. Relevant changes include GRPSeed, GRPSeedhr, Headless line 59 and Core line 134.
--This is so Language.Haskell.Exts.Parser is viable to use.
import GRPSeed
import GRPCommon
import GRPFitness
import GRPSafety
import PartitioningProblem
import GRPStats
import GRPGe... | vektordev/GP | src/GRPCore.hs | gpl-2.0 | 13,285 | 13 | 19 | 2,542 | 3,335 | 1,715 | 1,620 | 181 | 6 |
{-# LANGUAGE NoMonomorphismRestriction, TypeFamilies #-}
import Diagrams.Prelude hiding (Point(..), union, intersection)
import qualified Diagrams.Prelude as DP
import Diagrams.Backend.Cairo.CmdLine
import Data.Colour
import GGen.Geometry.Types
import GGen.Geometry.Polygon
import GGen.Geometry.PolygonCSG
import Con... | bgamari/GGen | CSGTest.hs | gpl-3.0 | 3,264 | 13 | 16 | 1,022 | 1,129 | 599 | 530 | 80 | 4 |
{-# LANGUAGE DeriveGeneric #-}
-- This type represents all messages that an Estuary client can send
-- to an Estuary server via WebSockets.
module Estuary.Types.Request where
import Data.Time.Clock
import Data.Text
import GHC.Generics
import Data.Aeson
import Estuary.Types.EnsembleRequest
import Estuar... | d0kt0r0/estuary | common/src/Estuary/Types/Request.hs | gpl-3.0 | 1,432 | 0 | 8 | 231 | 168 | 101 | 67 | 23 | 0 |
module Main (module Language.Lambda.Compiler) where
import Language.Lambda.Compiler
| justinmanley/lambda | Compiler.hs | gpl-3.0 | 86 | 0 | 5 | 9 | 19 | 13 | 6 | 2 | 0 |
{-|
Module : Graphics.QML.Transient.Signal
License : BSD3
Maintainer : marcin.jan.mrotek@gmail.com
Stability : experimental
Setup QML signals.
-}
{-# LANGUAGE
ConstraintKinds
, ExplicitForAll
, FlexibleContexts
, ScopedTypeVariables
, TypeFamilies
#-}
module Graphics.QML.Transient.Signal
... | marcinmrotek/hsqml-transient | src/Graphics/QML/Transient/Signal.hs | gpl-3.0 | 1,636 | 0 | 15 | 349 | 421 | 221 | 200 | 49 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
module CMS where
import Detector.Type
cms2011 :: DetectorDescription ImportList
cms2011 = DetectorDescription
{ detectorName = "CMS2011"
, detectorDescription = "CMS 2011 detector description"
, detectorReference... | wavewave/detector-yaml | lib/CMS.hs | gpl-3.0 | 20,557 | 0 | 13 | 6,474 | 5,613 | 3,546 | 2,067 | 471 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-
NICTA t3as NER Client
Copyright 2014 NICTA
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation, either version 3 of the License, or (at your option) any later
versio... | NICTA/nicta-ner | nicta-ner-client-hs/src-cmdline/nicta-ner-client-hs.hs | gpl-3.0 | 3,462 | 0 | 16 | 910 | 826 | 452 | 374 | 63 | 2 |
module WinShop.Types (
WSRequest
) where
import qualified Network.HTTP as H
type WSRequest = H.Request String
| RayRacine/winshop | src/WinShop/Types.hs | gpl-3.0 | 114 | 0 | 6 | 20 | 30 | 19 | 11 | 4 | 0 |
{-# LANGUAGE OverloadedStrings #-}
module Users.ControllerSpec (spec) where
import Test.Hspec
import Test.Hspec.Fn
import Common
import Users.Model
spec :: Spec
spec = fnTests $ do
describe "/users" $ do
it "should list all the users" $ do
get "/users" >>= should2... | huggablemonad/smooch | app/tests/Users/ControllerSpec.hs | gpl-3.0 | 1,462 | 0 | 18 | 539 | 347 | 185 | 162 | 36 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
import Data.Ratio
import Data.List
import XMonad
-- import XMonad.Config.Desktop
--import XMonad.Config.Gnome
import XMonad.Config.Kde
import XMonad.Config.Xfce
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.Manag... | tblancher/xmonad.hs | xmonad.hs | gpl-3.0 | 26,739 | 268 | 19 | 8,154 | 4,500 | 2,527 | 1,973 | 303 | 6 |
-- 4.1
halve :: [a] -> ([a],[a])
halve xs = splitAt (length xs `div` 2) xs
{-
halve xs = splitAt len xs
where
len = length xs `div` 2
-}
-- 4.2
third :: [a] -> a
-- third xs = head (tail(tail xs))
-- third xs = xs !! 2
third (_:_:x:_) = x
-- 4.3
safetail :: [a] -> [a]
-- safetail xs = if (... | senavi/haskell | chp4.hs | gpl-3.0 | 1,108 | 0 | 13 | 344 | 400 | 226 | 174 | 21 | 2 |
import H99.Problem11
main = do
putStrLn "Enter a list of characters:"
inputList <- readLn :: IO [Char]
putStrLn (show (encodeModified inputList))
| shimanekb/H-99SetTwo | problem11/src/Main.hs | gpl-3.0 | 171 | 0 | 11 | 46 | 51 | 24 | 27 | 5 | 1 |
-- filter the values in the give list based on the predicate function
-- Ex: filter' (>10) [1..12]
-- [11,12]
filter' :: (a -> Bool) -> [a] -> [a]
filter' _ [] = []
filter' f (x:xs)
| f x = x:filter' f xs
| otherwise = filter' f xs
-- filter with left fold
filter'' :: (a -> Bool) -> [a] -> [a]
filter'' pred li... | muralikrishna8/Haskell-problems | filter.hs | gpl-3.0 | 681 | 1 | 10 | 155 | 244 | 130 | 114 | 9 | 2 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-alertcenter/gen/Network/Google/Resource/AlertCenter/Alerts/Undelete.hs | mpl-2.0 | 5,500 | 0 | 17 | 1,273 | 790 | 464 | 326 | 112 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
-- |
-- Module : Network.Google.Storage
-- Copyright : (c) 2015-2016 Brendan Hay
-- License : Mozilla Publ... | rueshyna/gogol | gogol-storage/gen/Network/Google/Storage.hs | mpl-2.0 | 15,588 | 0 | 38 | 3,252 | 1,709 | 1,244 | 465 | 337 | 0 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-healthcare/gen/Network/Google/Resource/Healthcare/Projects/Locations/DataSets/Hl7V2Stores/Messages/Delete.hs | mpl-2.0 | 5,854 | 0 | 15 | 1,189 | 698 | 409 | 289 | 113 | 1 |
<h3>Example 69 (UI in layout)</h3>
<plot-row height=300 aspect=4>
<plot axis-x-transform="log"
hist="[[histogram(abs(tstdata.x), {transform:'log',nbins:10})]]">
<bars x="[[hist.centres]]" bar-min="[[hist.bins#0]]"
bar-max="[[hist.bins#1]]" y="[[hist.freqs]]"></bars>
</plot>
<plot hist="[[hi... | openbrainsrc/hRadian | examples/Example/defunct/Eg69.hs | mpl-2.0 | 11,535 | 1,038 | 10 | 576 | 5,240 | 1,861 | 3,379 | -1 | -1 |
module Graph (GraphG, GraphE, GraphA, Node, unique) where
-- -- DATA CONSTRUCTORS
data Node a = Node a deriving Eq
data Edge a = Edge (Node a, Node a)
data Arc a = Arc (Node a, Node a, Int) deriving Eq
data Path a = Path [Node a] deriving (Show, Eq)
-- graph-term form
data GraphG a = GraphG [Node a] [Edge a] deriving ... | ekalosak/haskell-practice | Graph.hs | lgpl-3.0 | 5,374 | 0 | 13 | 1,422 | 2,688 | 1,383 | 1,305 | -1 | -1 |
import Control.Monad (replicateM)
chocs n c m =
let chocs = div n c
swap c
| c >= m = (\(d, d') -> d + swap (d + d')) $divMod c m
| otherwise = 0
in chocs + swap chocs
trip = do
[n, c, m] <- fmap (take 3 . map read . words) getLine
return $ chocs n c m
main = mapM pri... | itsbruce/hackerrank | alg/implementation/chocFeast.hs | unlicense | 359 | 2 | 16 | 126 | 195 | 91 | 104 | 11 | 1 |
{-# LANGUAGE
ExistentialQuantification,
FlexibleContexts,
RankNTypes,
ScopedTypeVariables,
UndecidableInstances
#-}
module World.Utils (
actionDirection,
cellAgent,
cellWumpus,
cellEntity,
cellHas,
light,
light',
numItems,
shortestPaths,
searchPaths,
dist,
coordDis... | jtapolczai/wumpus | World/Utils.hs | apache-2.0 | 13,859 | 0 | 21 | 3,434 | 3,652 | 1,970 | 1,682 | -1 | -1 |
{- © Utrecht University (Department of Information and Computing Sciences) -}
module Domain.Scenarios.Services.ExtraServices where
import Control.Arrow
import Data.Maybe
import Ideas.Common.Library
import Ideas.Service.State
import Domain.Scenarios.Expression
import Domain.Scenarios.Globals
import Domain.Scenarios.... | UURAGE/ScenarioReasoner | src/Domain/Scenarios/Services/ExtraServices.hs | apache-2.0 | 2,881 | 0 | 13 | 609 | 631 | 338 | 293 | -1 | -1 |
{-# OPTIONS -fglasgow-exts -#include "../include/gui/qtc_hs_QItemSelection.h" #-}
-----------------------------------------------------------------------------
{-| Module : QItemSelection.hs
Copyright : (c) David Harley 2010
Project : qtHaskell
Version : 1.1.4
Modified : 2010-09-02 17:02:14
... | uduki/hsQt | Qtc/Gui/QItemSelection.hs | bsd-2-clause | 4,210 | 0 | 13 | 648 | 1,149 | 595 | 554 | -1 | -1 |
module RaptrSpec where
import Network.Raptr.Raptr
import Test.Tasty
import Test.Tasty.Hspec
raptrSpec = describe "Raptr" $ do
it "runs 3 node cluster" $ do
result <- runRaptr
result `shouldBe` True
| capital-match/raptr | test/RaptrSpec.hs | bsd-3-clause | 243 | 0 | 11 | 73 | 59 | 32 | 27 | 8 | 1 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ViewPatterns #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-| This module contains logic for converting Dhall expressions to and... | Gabriel439/Haskell-Dhall-Library | dhall/src/Dhall/Binary.hs | bsd-3-clause | 47,233 | 977 | 14 | 24,014 | 9,253 | 4,965 | 4,288 | 988 | 105 |
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.Functions
-- Copyright : (c) Sven Panne 2019
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- Portability : portable
--
-- All raw functions fro... | haskell-opengl/OpenGLRaw | src/Graphics/GL/Functions.hs | bsd-3-clause | 2,781 | 0 | 5 | 271 | 518 | 383 | 135 | 67 | 0 |
{-# LANGUAGE PatternSynonyms #-}
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.EXT.SemaphoreFd
-- Copyright : (c) Sven Panne 2019
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- Portability ... | haskell-opengl/OpenGLRaw | src/Graphics/GL/EXT/SemaphoreFd.hs | bsd-3-clause | 723 | 0 | 5 | 101 | 57 | 43 | 14 | 9 | 0 |
-- usage: runhaskell CopyToUsbDrive.hs live-image.iso /dev/sdX
--
-- This will copy the live-image.iso to your USB thumb drive. It will further
-- add a partition on your bootable USB thumb drive that can be used by
-- Windows. Therefore it will first remove the existing Live-Linux partition
-- then create a new partit... | KaiHa/debian-live | CopyToUsbDrive.hs | bsd-3-clause | 5,652 | 16 | 19 | 1,769 | 1,627 | 834 | 793 | 110 | 7 |
module Plot.Utils where
import Data.Colour
import Data.Colour.Names
import Control.Lens
import Data.Default.Class
import Graphics.Rendering.Chart
line_e, line_t, line_d :: LineStyle
line_e = line_color .~ withOpacity red 0.8 $ line
line_t = line_color .~ withOpacity blue 0.8 $ line
line_d = line_color .~ withOpac... | finlay/random-dist | test/Plot/Utils.hs | bsd-3-clause | 1,265 | 0 | 13 | 280 | 397 | 213 | 184 | 33 | 1 |
{-# LANGUAGE QuasiQuotes #-}
import LiquidHaskell
import Prelude hiding (snd, fst)
data ST a s = S (s -> (a, s))
[lq| data ST a s <pre :: s -> Prop, post :: a -> s -> Prop>
= S (ys::(x:s<pre> -> ((a, s)<post>)))
|]
[lq| returnST :: forall <pre :: s -> Prop, post :: a -> s -> Prop>.
xStat... | spinda/liquidhaskell | tests/gsoc15/unknown/pos/State.hs | bsd-3-clause | 947 | 0 | 11 | 309 | 241 | 133 | 108 | 14 | 1 |
module FireLogic where
import Data.List (find)
import Data.Maybe (isNothing, fromMaybe)
import Types
onlyShallow :: [RequestParameter] -> Bool
onlyShallow opts | (shallowIn && (length opts) == 1) || (not shallowIn) = True
| otherwise = error "Shallow must be the only parameter"
wh... | sphaso/firebase-haskell-client | src/FireLogic.hs | bsd-3-clause | 2,743 | 0 | 15 | 727 | 805 | 433 | 372 | 40 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ExtendedDefaultRules #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE QuasiQuotes #-}
module Tests.Mitsuba.Class where
import Mitsuba.Class
import Test.Tasty
import Test.Tasty.HUnit
import Test.Tasty.TH
import Data.Text (Text)
import Test.HUnit
import GHC.Generics
import D... | jfischoff/hs-mitsuba | tests/Tests/Mitsuba/Class.hs | bsd-3-clause | 2,328 | 0 | 11 | 436 | 626 | 350 | 276 | -1 | -1 |
-- |
-- Module : $Header$
-- Copyright : (c) 2013-2014 Galois, Inc.
-- License : BSD3
-- Maintainer : cryptol@galois.com
-- Stability : provisional
-- Portability : portable
--
-- This module defines natural numbers with an additional infinity
-- element, and various arithmetic operators on them.
{... | dylanmc/cryptol | src/Cryptol/TypeCheck/Solver/InfNat.hs | bsd-3-clause | 4,834 | 0 | 17 | 1,653 | 1,630 | 824 | 806 | 92 | 4 |
{-# LANGUAGE DeriveDataTypeable #-}
module SayAnnNames (plugin, SomeAnn(..)) where
import GhcPlugins
import Control.Monad (unless)
import Data.Data
data SomeAnn = SomeAnn deriving (Data, Typeable)
plugin :: Plugin
plugin = defaultPlugin {
installCoreToDos = install
}
install :: [CommandLineOption] -> [CoreToDo] ... | sdiehl/ghc | testsuite/tests/plugins/annotation-plugin/SayAnnNames.hs | bsd-3-clause | 1,103 | 0 | 14 | 252 | 378 | 192 | 186 | 27 | 2 |
{-# OPTIONS_HADDOCK hide #-}
-- |
-- Module : Streamly.Internal.Data.Strict
-- Copyright : (c) 2019 Composewell Technologies
-- (c) 2013 Gabriel Gonzalez
-- License : BSD3
-- Maintainer : streamly@composewell.com
-- Stability : experimental
-- Portability : GHC
--
-- | Strict data types to ... | harendra-kumar/asyncly | src/Streamly/Internal/Data/Strict.hs | bsd-3-clause | 2,125 | 0 | 9 | 352 | 251 | 159 | 92 | 41 | 1 |
{-
ShadowMap.hs (adapted from shadowmap.c which is (c) Silicon Graphics, Inc.)
Copyright (c) Sven Panne 2002-2005 <sven.panne@aedion.de>
This file is part of HOpenGL and distributed under a BSD-style license
See the file libraries/GLUT/LICENSE
-}
import Control.Monad ( when, unless )
import Data.IORef ( IO... | FranklinChen/hugs98-plus-Sep2006 | packages/GLUT/examples/RedBook/ShadowMap.hs | bsd-3-clause | 8,315 | 3 | 19 | 2,087 | 2,773 | 1,313 | 1,460 | 205 | 10 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
module API where
------------------------------------------------------------------------------
import Control.Monad (mzero)
import qualified Data.Aeson as A
import Data.Ae... | CBMM/CBaaS | cbaas-lib/src/API.hs | bsd-3-clause | 3,248 | 0 | 27 | 978 | 665 | 375 | 290 | 56 | 0 |
{-# LANGUAGE RankNTypes #-}
-- | The following module implements
-- /Compact Hilbert Indices - Technical Report -- CS-2006-07/
-- by Chris Hamilton. At the time of writing this comment, the document is
-- found at:
-- <https://www.cs.dal.ca/sites/default/files/technical_reports/CS-2006-07.pdf>
--
module Data.A... | cje/hilbert | src/Data/Algorithm/Hilbert/Utility.hs | bsd-3-clause | 8,561 | 0 | 13 | 2,549 | 1,346 | 751 | 595 | 77 | 1 |
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ScopedTypeVariables #-}
-- | The event mode lets you manage your own input.
-- Pressing ESC will still closes the window, but you don't get automatic
-- pan and zoom controls like with 'graphicsout'. Should only be called once
-- dur... | christiaanb/fpprac | src/FPPrac/Events.hs | bsd-3-clause | 14,107 | 0 | 13 | 4,143 | 3,143 | 1,776 | 1,367 | 203 | 2 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE ViewPatterns #-}
-- | The Employee-Department schema used in th... | ulricha/dsh-tpc-h | Schema/Shredding.hs | bsd-3-clause | 1,842 | 0 | 10 | 544 | 478 | 261 | 217 | 56 | 1 |
-- | A queue of passive critical pairs, using a memory-efficient representation.
{-# LANGUAGE TypeFamilies, RecordWildCards, FlexibleContexts, ScopedTypeVariables, StandaloneDeriving #-}
module Twee.PassiveQueue(
Params(..),
Queue,
Passive(..),
empty, insert, removeMin, mapMaybe, toList, queueSize) where
impor... | nick8325/kbc | src/Twee/PassiveQueue.hs | bsd-3-clause | 7,693 | 15 | 18 | 1,537 | 2,062 | 1,078 | 984 | 141 | 3 |
{-# LANGUAGE LambdaCase #-}
-- |
-- Module : Game.Simulation.Input
-- Description : Contains input related functions and signals
-- for the game simulation
-- Copyright : (c) 2016 Caitlin Wilks
-- License : BSD3
-- Maintainer : Caitlin Wilks <mitasuki@gmail.com>
--
--
module Game.Si... | Catchouli/tyke | src/Game/Simulation/Input.hs | bsd-3-clause | 7,874 | 0 | 16 | 2,187 | 1,546 | 793 | 753 | 114 | 2 |
{-# LANGUAGE ViewPatterns #-}
-- | The endpoints on the cloud server
module Development.Shake.Internal.History.Bloom(
Bloom, bloomTest, bloomCreate
) where
import Data.Word
import Data.Bits
import Data.Hashable
import Data.Semigroup
import Foreign.Storable
import Foreign.Ptr
import Prelude
-- | Given an Int... | ndmitchell/shake | src/Development/Shake/Internal/History/Bloom.hs | bsd-3-clause | 1,552 | 0 | 10 | 387 | 517 | 267 | 250 | 37 | 1 |
module Main where
putHello :: String -> IO ()
putHello x = putStrLn ("Hello " ++ x)
main :: IO ()
main = putHello "Fragnix!" | phischu/fragnix | tests/quick/HiFragnix/HiFragnix.hs | bsd-3-clause | 126 | 0 | 7 | 26 | 54 | 28 | 26 | 5 | 1 |
{- |
Module : Camfort.Specification.Units.Parser.Types
Description : Defines the representation of unit specifications resulting from parsing.
Copyright : (c) 2017, Dominic Orchard, Andrew Rice, Mistral Contrastin, Matthew Danish
License : Apache-2.0
Maintainer : dom.orchard@gmail.com
Stability : e... | dorchard/camfort | src/Camfort/Specification/Units/Parser/Types.hs | apache-2.0 | 1,869 | 0 | 14 | 394 | 524 | 275 | 249 | 45 | 0 |
{-# LANGUAGE TemplateHaskell #-}
{-| Unittests for the static lock declaration.
-}
{-
Copyright (C) 2016 Google Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code... | onponomarev/ganeti | test/hs/Test/Ganeti/JQueue/LockDecls.hs | bsd-2-clause | 5,098 | 0 | 22 | 1,225 | 1,038 | 534 | 504 | 90 | 1 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
module Stack.Dot (dot
,listDependencies
,DotOpts(..)
,DotPayload(..)
,ListDepsOpts(... | juhp/stack | src/Stack/Dot.hs | bsd-3-clause | 25,549 | 7 | 20 | 7,452 | 6,107 | 3,167 | 2,940 | 461 | 4 |
module Sql.Utils where
import Database.HDBC
import Database.HDBC.Sqlite3
import Data.Maybe
import Types
conn :: IO Connection
conn = connectSqlite3 "hunter.db"
fetch :: Connection -> String -> [SqlValue] -> IO (Maybe [SqlValue])
fetch c s vs = do
com <- prepare c s
execute com vs
fetchRow com
lastRowId ... | hherman1/CatanServ | src/Sql/Utils.hs | bsd-3-clause | 467 | 0 | 11 | 95 | 171 | 86 | 85 | 16 | 1 |
-- | Item and treasure definitions.
module Content.ItemKind ( cdefs ) where
import qualified Data.EnumMap.Strict as EM
import Data.List
import Content.ItemKindActor
import Content.ItemKindBlast
import Content.ItemKindOrgan
import Content.ItemKindTemporary
import Game.LambdaHack.Common.Ability
import Game.LambdaHack.C... | Concomitant/LambdaHack | GameDefinition/Content/ItemKind.hs | bsd-3-clause | 38,245 | 0 | 14 | 10,503 | 10,786 | 6,512 | 4,274 | 827 | 1 |
module Nullable where
import FFI
data R = R (Nullable Double)
main :: Fay ()
main = do
printD $ Nullable (1 :: Double)
printNS $ Nullable "Hello, World!"
printSS $ Defined ["Hello,","World!"]
printD $ (Null :: Nullable Double)
print' $ R (Nullable 1)
print' $ R Null
print' $ r1
print' $ r2
... | beni55/fay | tests/Nullable.hs | bsd-3-clause | 965 | 0 | 10 | 213 | 337 | 163 | 174 | 32 | 1 |
{-# LANGUAGE Haskell98, MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances #-}
{-# LINE 1 "Control/Monad/List.hs" #-}
-----------------------------------------------------------------------------
-- |
-- Module : Control.Monad.List
-- Copyright : (c) Andy Gill 2001,
-- (c) Oregon G... | phischu/fragnix | tests/packages/scotty/Control.Monad.List.hs | bsd-3-clause | 832 | 0 | 5 | 136 | 67 | 51 | 16 | 10 | 0 |
{-# Language PatternGuards #-}
module Blub
( blub
, foo
, bar
) where
import Control.Applicative
(r, t, z)
import Control.Foo (foo)
import Ugah.Blub
( a
, b
, c
)
f :: Int -> Int
f = (+ 3)
r :: Int -> Int
r =
| jystic/hsimport | tests/goldenFiles/SymbolTest32.hs | bsd-3-clause | 237 | 1 | 6 | 75 | 88 | 55 | 33 | -1 | -1 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ScopedTypeVariables #-}
-- | Extra functions for optparse-applicative.
module Options.Applicative.Builder.Extra
(boolFlags
,boolFlagsNoDefault
,firstBoolFlagsNoDefault
,firstBoolFlagsTrue
,firstBoolFlagsFalse
,enableDisableFl... | juhp/stack | src/Options/Applicative/Builder/Extra.hs | bsd-3-clause | 11,661 | 0 | 29 | 3,375 | 2,620 | 1,383 | 1,237 | 224 | 10 |
-- |
-- Copyright : (c) 2010 Simon Meier
-- License : GPL v3 (see LICENSE)
--
-- Maintainer : Simon Meier <iridcode@gmail.com>
-- Portability : portable
--
-- Type-class abstracting computations that need a fresh name supply.
module Control.Monad.Fresh.Class (
MonadFresh(..)
) where
-- import Control.Basics
... | tamarin-prover/tamarin-prover | lib/utils/src/Control/Monad/Fresh/Class.hs | gpl-3.0 | 2,592 | 0 | 10 | 556 | 515 | 286 | 229 | 39 | 0 |
module Hint.Type(module Hint.Type, module Idea, module HSE.All, module Refact) where
import Data.Monoid
import HSE.All
import Idea
import Prelude
import Refact
type DeclHint = Scope -> Module_ -> Decl_ -> [Idea]
type ModuHint = Scope -> Module_ -> [Idea]
type CrossHint = [(Scope, Module_)] -> [Idea]
-- | ... | mpickering/hlint | src/Hint/Type.hs | bsd-3-clause | 1,300 | 0 | 12 | 295 | 404 | 226 | 178 | 18 | 0 |
{-# OPTIONS_GHC -XGADTs -XRankNTypes -O1 #-}
-- #2018
module Bug1 where
data A a where
MkA :: A ()
class C w where
f :: forall a . w a -> Maybe a
instance C A where
f MkA = Just ()
| sdiehl/ghc | testsuite/tests/typecheck/should_compile/tc241.hs | bsd-3-clause | 198 | 0 | 9 | 59 | 71 | 38 | 33 | -1 | -1 |
{-# LANGUAGE TemplateHaskell #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-| Unittests for the 'Ganeti.Common' module.
-}
{-
Copyright (C) 2009, 2010, 2011, 2012, 2013 Google Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the fol... | grnet/snf-ganeti | test/hs/Test/Ganeti/Common.hs | bsd-2-clause | 7,765 | 0 | 17 | 2,506 | 1,137 | 627 | 510 | 113 | 5 |
{-# LANGUAGE RebindableSyntax, NPlusKPatterns #-}
module Main where
{
-- import Prelude;
import qualified Prelude;
import Prelude(String,undefined,Maybe(..),IO,putStrLn,
Integer,(++),Rational, (==), (>=) );
import Prelude(Monad(..),Applicative(..),Functor(..));
... | ezyang/ghc | testsuite/tests/rebindable/rebindable2.hs | bsd-3-clause | 4,854 | 15 | 23 | 2,121 | 1,264 | 695 | 569 | 86 | 1 |
{-# LANGUAGE DataKinds, KindSignatures, TypeFamilies #-}
module T9263a where
import T9263b
import Data.Proxy
data Void
instance PEq ('KProxy :: KProxy Void)
| urbanslug/ghc | testsuite/tests/polykinds/T9263a.hs | bsd-3-clause | 160 | 1 | 8 | 24 | 35 | 20 | 15 | -1 | -1 |
module Main where
import LambdaPi.Bound
import Test.Tasty
import Test.Tasty.HUnit
assertType :: String -> TestName -> (Expr Int, Expr Int) -> TestTree
assertType s n (e, t) = testCase n $ assertBool s (hasType e t)
consts :: TestTree
consts = testGroup "Constant Tests"
[ assertType "ETrue is wrong" "True" (E... | jozefg/cooked-pi | test/Bound.hs | mit | 838 | 0 | 12 | 214 | 285 | 152 | 133 | 23 | 1 |
{-# LANGUAGE RecordWildCards, NamedFieldPuns #-}
module Language.Plover.Simplify
(simplify, Expr(..))
where
import qualified Data.Map.Strict as M
import Control.Monad (foldM)
import Data.Maybe (mapMaybe)
-- TODO add rebuild to atom
data Expr e num
= Sum [(Expr e num)]
| Mul [(Expr e num)]
| Atom e
| Prim num... | swift-nav/plover | src/Language/Plover/Simplify.hs | mit | 2,146 | 0 | 13 | 524 | 975 | 516 | 459 | 58 | 6 |
-- | Implementation of an execution environment that uses /systemdNspawn/.
module B9.SystemdNspawn
( SystemdNspawn (..),
)
where
import B9.B9Config
( getB9Config,
systemdNspawnConfigs,
)
import B9.B9Config.SystemdNspawn as X
import B9.B9Error
import B9.B9Exec
import B9.B9Logging
import B9.BuildInfo
import ... | sheyll/b9-vm-image-builder | src/lib/B9/SystemdNspawn.hs | mit | 9,163 | 0 | 17 | 2,186 | 2,241 | 1,158 | 1,083 | -1 | -1 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeSynonymInstances #-}
module IHaskell.Display.Widgets.Bool.ToggleButton (
-- * The ToggleButton Widget
ToggleButton,
-- * Constructor
mkToggleButton) where
-- To keep `cabal re... | beni55/IHaskell | ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Bool/ToggleButton.hs | mit | 2,085 | 0 | 14 | 540 | 418 | 229 | 189 | 46 | 1 |
{-# OPTIONS_GHC -O0 #-}
{-# LANGUAGE TypeOperators, OverloadedStrings, DeriveGeneric #-}
{-# LANGUAGE ScopedTypeVariables, GeneralizedNewtypeDeriving, CPP #-}
-- | Tests that modify the database.
module Tests.Mutable (mutableTests) where
import Control.Concurrent
import Control.Monad.Catch
import Data.ByteString (ByteS... | valderman/selda | selda-tests/test/Tests/Mutable.hs | mit | 28,481 | 0 | 19 | 7,017 | 9,118 | 4,517 | 4,601 | 711 | 2 |
module Icarus.Bezier (Point(..),
Despair(..),
pointToList,
pointToTuple, tupleToPoint,
bezier,
line1d',
cubic, cubicSeq, trange) where
import Control.Monad (zipWithM)
------------------... | arnau/icarus | src/Icarus/Bezier.hs | mit | 5,419 | 0 | 12 | 1,332 | 1,242 | 676 | 566 | 70 | 1 |
-- | Upload to Stackage and Hackage
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE FlexibleContexts #-}
module Stackage.Uplo... | fpco/stackage-curator | src/Stackage/Upload.hs | mit | 1,513 | 0 | 15 | 476 | 285 | 154 | 131 | 42 | 1 |
{-# LANGUAGE NoDeriveAnyClass #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module TokenCSFR ( TokenCSFR()
, csfrChallenge
, correctCSFR
) where
import Database.Persist
import Lucid
import Orphan.UUID
import Proto... | mreider/kinda-might-work | src/TokenCSFR.hs | mit | 948 | 0 | 8 | 307 | 226 | 126 | 100 | 27 | 1 |
{-# OPTIONS -Wall #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE LambdaCase #-}
import Control.Monad (foldM)
import Data.Bool (bool)
import Data.Functor
import qualified Data.List as List
import Data.Ord (comparing)
import Data.Text (Text)
import Data.Vector (Vector, (//))
import qualified Data.Vector as Vector
impor... | SamirTalwar/advent-of-code | 2021/AOC_24_2.hs | mit | 4,543 | 0 | 19 | 1,180 | 2,060 | 1,057 | 1,003 | -1 | -1 |
{-# htermination (maxOrdering :: Ordering -> Ordering -> Ordering) #-}
import qualified Prelude
data MyBool = MyTrue | MyFalse
data List a = Cons a (List a) | Nil
data Ordering = LT | EQ | GT ;
ltEsOrdering :: Ordering -> Ordering -> MyBool
ltEsOrdering LT LT = MyTrue;
ltEsOrdering LT EQ = MyTrue;
ltEsOr... | ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/basic_haskell/max_6.hs | mit | 768 | 0 | 8 | 166 | 276 | 152 | 124 | 22 | 1 |
-- | Evaluators for Language.TaPL.Arith.
module Language.TaPL.Arith.Eval (eval, eval') where
import Control.Applicative ((<$>))
import Language.TaPL.Arith.Syntax (Term(..), isVal, isNumericVal)
-- | Small step evaluator.
eval :: Term -> Maybe Term
eval t | isVal t = Just t
| otherwise =
case eval1... | zeckalpha/TaPL | src/Language/TaPL/Arith/Eval.hs | mit | 1,613 | 0 | 10 | 429 | 736 | 347 | 389 | 45 | 9 |
-- TODO: remove mkApp, unsafeUnApp
{-# LANGUAGE TemplateHaskell, TypeOperators #-}
module Language.CL.C.HOAS.Naming (function, cl) where
import Language.CL.C.HOAS.AST
import Language.CL.C.Types.Classes
import Language.Haskell.TH
import Control.Monad (join)
import Data.Monoid (mempty)
-- | 'function' should be used ... | pxqr/language-cl-c | Language/CL/C/HOAS/Naming.hs | mit | 1,848 | 0 | 14 | 371 | 725 | 374 | 351 | 31 | 2 |
module Javelin.Lib.ByteCode.FieldMethod where
import qualified Data.Binary.Get as Get
import qualified Data.Map.Lazy as Map
import qualified Data.Word as Word
import qualified Javelin.Lib.ByteCode.Attribute as Attribute
import qualified Javelin.Lib.ByteCode.Data as ByteCode
import qualified Javelin.Lib.ByteCode.Utils... | antonlogvinenko/javelin | src/Javelin/Lib/ByteCode/FieldMethod.hs | mit | 2,035 | 0 | 13 | 316 | 566 | 330 | 236 | 50 | 1 |
{-# LANGUAGE TemplateHaskell, DeriveDataTypeable #-}
module Rushhour.Config where
import Rushhour.Data ( Rushhour )
import Autolib.Reader
import Autolib.ToDoc
import Autolib.Reporter
import Data.Typeable
import qualified Challenger as C
data Config =
Config { width :: Int
, height :: Int
, num_car... | Erdwolf/autotool-bonn | src/Rushhour/Config.hs | gpl-2.0 | 1,348 | 9 | 14 | 342 | 381 | 208 | 173 | -1 | -1 |
{-Curves.hs; Mun Hon Cheong (mhch295@cse.unsw.edu.au) 2005
This modules is used to generate a biquadratic patch used in the
Q3Map2 format.
The code for this was translated from
http://graphics.cs.brown.edu/games/quake/quake3.html
it can also be found in the source code for Paul's Quake 3 BSP loader
http... | kvelicka/frag | src/Curves.hs | gpl-2.0 | 7,631 | 7 | 20 | 1,948 | 2,880 | 1,520 | 1,360 | 129 | 1 |
{-# LANGUAGE TemplateHaskell, DeriveDataTypeable #-}
{-# language MultiParamTypeClasses #-}
{-# language PatternSignatures #-}
{-# language OverlappingInstances #-}
module Haskell.Blueprint.Central where
import Debug ( debug )
import Haskell.Blueprint.Data
import Haskell.Blueprint.Match
import qualified Language.H... | marcellussiegburg/autotool | collection/src/Haskell/Blueprint/Central.hs | gpl-2.0 | 6,010 | 0 | 23 | 1,759 | 1,422 | 750 | 672 | 118 | 3 |
{-# OPTIONS -XNoMonoLocalBinds #-}
module Grin.DeadCode(deadCode) where
import Control.Monad
import Data.Monoid
import qualified Data.Set as Set
import Fixer.Fixer
import Fixer.Supply
import Grin.Grin
import Grin.Noodle
import Grin.Whiz
import Stats hiding(print, singleton)
import StringTable.Atom
import Support.CanT... | dec9ue/jhc_copygc | src/Grin/DeadCode.hs | gpl-2.0 | 11,021 | 32 | 32 | 3,396 | 4,140 | 2,101 | 2,039 | -1 | -1 |
{-# LANGUAGE TemplateHaskell #-}
module NFA.Property where
import Autolib.Reader
import Autolib.ToDoc
import Data.Typeable
import Autolib.Set
import Autolib.NFA
data NFAC c Int => Property c
= Sane
| Min_Size Int
| Max_Size Int
| Alphabet ( Set c )
| Deterministic
... | florianpilz/autotool | src/NFA/Property.hs | gpl-2.0 | 652 | 2 | 9 | 188 | 166 | 96 | 70 | -1 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.