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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
-- Copyright (c) 2010, Diego Souza
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions are met:
--
-- * Redistributions of source code must retain the above copyright notice,
-- this list of conditio... | dgvncsz0f/iyql | src/main/haskell/Yql/Core/Session.hs | gpl-3.0 | 3,749 | 0 | 12 | 877 | 642 | 342 | 300 | 45 | 2 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | kim/amazonka | amazonka-opsworks/gen/Network/AWS/OpsWorks/StartStack.hs | mpl-2.0 | 3,066 | 0 | 9 | 668 | 360 | 221 | 139 | 48 | 1 |
{-
Copyright 2013 Google Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in ... | mzero/plush | src/Plush/Run/BuiltIns/ScriptTools.hs | apache-2.0 | 3,675 | 0 | 16 | 1,063 | 906 | 476 | 430 | 56 | 16 |
-- the base concept of a theme
-- defining non-spatial and non-temporal thematic (a.k.a. attribute) values and operations on them
-- (c) Werner Kuhn
-- latest change: Jan 15, 2016
module Theme where
-- thematic values
-- essentially measurement scales
-- modeled as a sum type (until we need more)
-- any generic behav... | liangcun/ConceptsOfSpatialInformation | extras/CoreConceptsHs Backup/Theme.hs | apache-2.0 | 495 | 0 | 6 | 85 | 52 | 34 | 18 | 2 | 0 |
-- | Production entry point to web app.
module Main where
import Control.Concurrent
import Foundation
import Yesod
-- | Normal production main.
main :: IO ()
main = do c <- newChan
warpEnv (Piggies c)
| codygman/ghci-reload-demo | src/Main.hs | bsd-3-clause | 214 | 0 | 9 | 48 | 51 | 28 | 23 | 7 | 1 |
{-# LANGUAGE CPP #-}
import Control.Monad
import Data.IORef
import Control.Exception (SomeException, catch)
import Distribution.Simple
import Distribution.Simple.BuildPaths (autogenModulesDir)
import Distribution.Simple.InstallDirs as I
import Distribution.Simple.LocalBuildInfo as L
import qualified Distribution.Simpl... | ctford/Idris-Elba-dev | Setup.hs | bsd-3-clause | 7,577 | 0 | 15 | 1,774 | 1,646 | 867 | 779 | 132 | 3 |
{-# LANGUAGE TemplateHaskell, MultiParamTypeClasses, PatternGuards #-}
-- Copyright (c) 2004-6 Donald Bruce Stewart - http://www.cse.unsw.edu.au/~dons
-- GPL version 2 or later (see http://www.gnu.org/copyleft/gpl.html)
-- | A Haskell evaluator for the pure part, using plugs
module Plugin.Eval where
import File (fin... | dmalikov/lambdabot | Plugin/Eval.hs | mit | 7,884 | 0 | 20 | 2,440 | 1,239 | 667 | 572 | 83 | 7 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | romanb/amazonka | amazonka-rds/gen/Network/AWS/RDS/ModifyDBParameterGroup.hs | mpl-2.0 | 6,238 | 0 | 10 | 1,184 | 526 | 331 | 195 | 63 | 1 |
module Main where
import Lib
main = do
putStrLn $ "Sample strings: " ++ show someStrings
| juhp/stack | test/integration/tests/proper-rebuilds/files/app/Main.hs | bsd-3-clause | 93 | 0 | 8 | 20 | 26 | 14 | 12 | 4 | 1 |
{-
Glossary: a simple glossary generator for Barrelfish
Copyright (c) 2010, ETH Zurich.
All rights reserved.
This file is distributed under the terms in the attached LICENSE file.
If you do not find this file, copies can be found by writing to:
ETH Zurich D-INFK, Universitaetstr. 6, CH-8092 Zurich.... | utsav2601/cmpe295A | doc/001-glossary/Main.hs | mit | 21,245 | 124 | 9 | 7,161 | 1,093 | 583 | 510 | 116 | 1 |
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd">
<helpset version="2.0" xml:lang="fil-PH">
<title>Mga Panuntunan sa Aktibong Pag-scan | ZAP Ekstensyon</title>
<maps>
<homeID>... | thc202/zap-extensions | addOns/ascanrules/src/main/javahelp/org/zaproxy/zap/extension/ascanrules/resources/help_fil_PH/helpset_fil_PH.hs | apache-2.0 | 1,004 | 78 | 67 | 163 | 427 | 215 | 212 | -1 | -1 |
{-# OPTIONS_GHC -fno-warn-redundant-constraints #-}
{-# LANGUAGE TypeFamilies #-}
module T4200 where
import Data.Kind (Type)
class C a where
type In a :: Type
op :: In a -> a -> Int
-- Should be ok; no -XUndecidableInstances required
instance (In c ~ Int) => C [c] where
type In [c] = In c
op _ _ = 3
| sdiehl/ghc | testsuite/tests/indexed-types/should_compile/T4200.hs | bsd-3-clause | 314 | 0 | 8 | 71 | 99 | 55 | 44 | -1 | -1 |
module TyVar () where
{-@ foo :: Eq b => a -> b -> a @-}
foo :: Eq b => a -> b -> a
foo = undefined
| mightymoose/liquidhaskell | tests/pos/tyvar.hs | bsd-3-clause | 101 | 0 | 7 | 30 | 33 | 19 | 14 | 3 | 1 |
{-# LANGUAGE Rank2Types #-}
-- |
-- Module : Data.Vector.Unboxed
-- Copyright : (c) Roman Leshchinskiy 2009-2010
-- License : BSD-style
--
-- Maintainer : Roman Leshchinskiy <rl@cse.unsw.edu.au>
-- Stability : experimental
-- Portability : non-portable
--
-- Adaptive unboxed vectors. The implementation i... | abakst/liquidhaskell | benchmarks/vector-0.10.0.1/Data/Vector/Unboxed.hs | bsd-3-clause | 42,666 | 0 | 14 | 9,289 | 9,389 | 5,229 | 4,160 | -1 | -1 |
{-# OPTIONS_GHC -fdefer-type-errors #-} -- Very important to this bug!
{-# Language PartialTypeSignatures #-}
{-# Language KindSignatures #-}
{-# Language PolyKinds #-}
{-# Language ScopedTypeVariables #-}
{-# Language AllowAmbiguousTypes #-}
{-# Language TypeApplications #-}
module T14584a where
f :: forall m. (... | shlevy/ghc | testsuite/tests/partial-sigs/should_fail/T14584a.hs | bsd-3-clause | 383 | 0 | 10 | 73 | 70 | 42 | 28 | 13 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : Haddock.Backends.HaddockDB
-- Copyright : (c) Simon Marlow 2003
-- License : BSD-like
--
-- Maintainer : haddock@projects.haskell.org
-- Stability : experimental
-- Portability : portable
-----------------... | niteria/haddock | haddock-api/src/Haddock/Backends/HaddockDB.hs | bsd-2-clause | 5,642 | 0 | 5 | 1,112 | 39 | 29 | 10 | 3 | 1 |
{-# LANGUAGE TypeFamilies #-}
-- This should fail
module T3208b where
class SUBST s where
type STerm s
class OBJECT o where
type OTerm o
apply :: (SUBST a, OTerm o ~ STerm a) => a -> o
fce' :: (OTerm a ~ STerm a, OBJECT a, SUBST a) => a -> c
fce' f = fce (apply f)
-- f :: a
-- apply f :: (SUBST a, OB... | urbanslug/ghc | testsuite/tests/indexed-types/should_compile/T3208b.hs | bsd-3-clause | 795 | 0 | 10 | 232 | 173 | 91 | 82 | 11 | 1 |
struct foo;
typedef struct foo *foo_p;
extern foo_p foop;
| SanDisk-Open-Source/SSD_Dashboard | uefi/gcc/gcc-4.6.3/gcc/testsuite/gcc.dg/pch/decl-3.hs | gpl-2.0 | 58 | 0 | 6 | 9 | 30 | 13 | 17 | -1 | -1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE OverloadedStrings #-}
module Json.ChartSpec (spec) where
import Data.Aeson (Value)
import Data.Aeson.Lens
import Data.Text (Text)
import Lastfm
import Lastfm.Chart
import Test.Hspec
import SpecHelper
spec :: Spec
spec = do
describe "get*Artists" $ do
let jsonQuery :: Fo... | supki/liblastfm | test/api/Json/ChartSpec.hs | mit | 1,210 | 0 | 15 | 286 | 342 | 172 | 170 | -1 | -1 |
module CoinChange where
data Pieces
= Cent
| TwoCent
| FiveCent
| TenCent
| TwentyCent
| FiftyCent
| Euro
| TwoEuro
deriving (Show, Eq, Ord)
pieces :: [Pieces]
pieces = [TwoEuro, Euro, FiftyCent, TwentyCent, TenCent, FiveCent, TwoCent, Cent]
pieceValue :: Pieces -> Int
pieceValue Cent ... | CarstenKoenig/CoinKataHSpec | src/CoinChange.hs | mit | 896 | 0 | 12 | 282 | 289 | 153 | 136 | 30 | 2 |
module Gatekeeper.Network ( netloop
) where
import qualified Data.ProtocolBuffers as P
import Control.Concurrent
import Network
import System.IO
import Gatekeeper.CRDT
import Gatekeeper.Protobufs
import Gatekeeper.NetUtils
netloop :: MVar State -> Socket -> IO b
netloop d s = do
(h... | dgonyeo/gatekeeper | Gatekeeper/Network.hs | mit | 4,985 | 0 | 25 | 2,554 | 1,474 | 680 | 794 | 71 | 2 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE NoImplicitPrelude #-}
module DrifterSpec (spec) where
import Protolude
import Test.Hspec
import Test.QuickCheck
import Data.ByteString.Char8
import Data.Text
import Data.Text.Encoding
import Pipes
import Pipes.Prelude
import Event
import Drifter
spec :: Spec
spec = des... | tort/mud-drifter | test/DrifterSpec.hs | mit | 777 | 0 | 8 | 130 | 144 | 72 | 72 | 24 | 1 |
{-|
Module: Flaw.Script.Lua.Operations
Description: Operations on Lua values.
License: MIT
-}
{-# LANGUAGE OverloadedStrings #-}
module Flaw.Script.Lua.Operations
( luaCoerceToNumber
, luaCoerceToInt
, luaCoerceToBool
, luaCoerceToString
, luaValueShow
, luaValueAdd
, luaValueSub
, luaValueMul
, lua... | quyse/flaw | flaw-lua/Flaw/Script/Lua/Operations.hs | mit | 14,235 | 0 | 28 | 3,426 | 4,841 | 2,395 | 2,446 | 324 | 9 |
{-# LANGUAGE OverloadedStrings, QuasiQuotes #-}
module Y2017.M11.D28.Exercise where
{--
Just as yesterday where we added a set of recommended articles, today we are
going to delete a set of articles.
--}
import Database.PostgreSQL.Simple
import Database.PostgreSQL.Simple.SqlQQ
import Store.SQL.Connection
import Sto... | geophf/1HaskellADay | exercises/HAD/Y2017/M11/D28/Exercise.hs | mit | 1,109 | 0 | 8 | 164 | 108 | 67 | 41 | 13 | 1 |
-- items in input file: width height camera UL-screen-corner xEdge yEdge object*
import Control.Monad (ap, guard, liftM2, liftM3, liftM4)
import Data.Char (isSpace)
import Data.Maybe (fromMaybe)
import Numeric
import System.Environment (getArgs)
import qualified Data.ByteString.Lazy as Buf (writeFile)
import Text.Pars... | jwodder/hsgraphics | bin/tracer.hs | mit | 5,197 | 56 | 20 | 1,068 | 1,942 | 1,018 | 924 | 110 | 3 |
--------------------------------------------------------------------------
-- Copyright (c) 2007-2010, ETH Zurich.
-- All rights reserved.
--
-- This file is distributed under the terms in the attached LICENSE file.
-- If you do not find this file, copies can be found by writing to:
-- ETH Zurich D-INFK, Universitätsta... | 8l/barrelfish | hake/K1om.hs | mit | 7,926 | 8 | 18 | 3,287 | 1,045 | 595 | 450 | 132 | 1 |
import Data.Maybe
import Data.List
import Game
import System.Environment ( getArgs )
-- nice games:
-- 25 50 75 100 3 6 = 952
-- 75 80 2 3 8 7 = 812
parseArgs :: [String] -> Game
parseArgs args
| length args == 7 = Game numbers target
| otherwise = error "usage: number*6 target"
where numbers = ma... | wharris/countdown | countdown.hs | mit | 458 | 0 | 10 | 123 | 140 | 71 | 69 | 13 | 1 |
module Config where
import Data.Map as Map
import System.FilePath.Posix
import Util
configDir :: String
configDir = "NemoLib"
ignoreFile :: String
ignoreFile = "NemoLib/ignore"
moduleRootsFile :: String
moduleRootsFile = "NemoLib/moduleRoots"
cloneFile :: String
cloneFile... | larioj/nemo | src/Config.hs | mit | 1,748 | 0 | 11 | 332 | 555 | 286 | 269 | 41 | 1 |
module Main where
import Control.Monad
import Control.Monad.Error
import System.Environment
import Text.ParserCombinators.Parsec hiding (spaces)
import Numeric
import Data.Ratio
import Data.Complex
import Data.Function
data LispError = NumArgs Integer [LispVal]
| TypeMismatch String LispVal
... | diminishedprime/.org | programmey_stuff/write_yourself_a_scheme/ch_04/hello.hs | mit | 11,471 | 0 | 17 | 3,443 | 3,177 | 1,640 | 1,537 | 253 | 5 |
import Data.Sequence as Seq
main = do
count <- read <$> getContents
print $ winner count
winner :: Int -> Int
winner count = winner' $ Seq.fromList [1 .. count]
where
winner' elves
| Seq.length elves == 1 = elves `index` 0
| otherwise = winner' (Seq.drop 2 elves |> elves `index` 0)
| SamirTalwar/advent-of-code | 2016/AOC_19_1.hs | mit | 307 | 0 | 13 | 77 | 129 | 65 | 64 | 9 | 1 |
-- Usage: runhaskell Generate.hs New.Module
module Generate (main) where
import Data.List (groupBy, isInfixOf)
import Data.Monoid ((<>))
import System.Directory (createDirectoryIfMissing)
import System.Environment (getArgs)
import System.FilePath (joinPath, takeDirectory, (<.>))
main :: IO ()
main = do
ms <- getA... | taktoa/SatOpt | Generate.hs | mit | 3,084 | 0 | 12 | 664 | 1,003 | 528 | 475 | 88 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module Data.Niagra.Properties.Misc
(
content,
cursor,
appearance,
outline,
outlineColor,
outlineOffset,
outlineStyle,
outlineWidth
)
where
import Data.Niagra.Monad
import Data.Niagra.Value
import Data.Niagra.Builder
import Data.Monoid
content :: (Monad m) => Buil... | fhsjaagshs/niagra | src/Data/Niagra/Properties/Misc.hs | mit | 1,146 | 0 | 8 | 195 | 377 | 198 | 179 | 34 | 1 |
-- The solution of exercise 1.2
-- Translate the given expression into prefix form
result = (5 + 4 + (2 - (3 - (6 + 4 / 5)))) / (3 * (6 - 2) * (2 - 7))
| perryleo/sicp | ch1/sicpc1e02.hs | mit | 156 | 0 | 14 | 43 | 73 | 41 | 32 | 1 | 1 |
module Control.Biegunka.Source.GitSpec (spec) where
import Control.Applicative (liftA2)
import Control.Lens (set)
import Data.Maybe (listToMaybe)
import System.Directory (createDirectory)
import System.FilePath ((</>))
import Test.Hspec.Lens
import ... | biegunka/biegunka | test/spec/Control/Biegunka/Source/GitSpec.hs | mit | 8,258 | 0 | 26 | 2,144 | 2,228 | 1,104 | 1,124 | 154 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE OverloadedStrings #-}
-----------------------------------------------------------------------------
--
-- Module : I... | cocreature/leksah | src/IDE/Pane/Preferences.hs | gpl-2.0 | 38,329 | 725 | 22 | 14,809 | 9,513 | 5,104 | 4,409 | 848 | 9 |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Control.Applicative
import Control.Monad
import Control.Concurrent
import Data.Map.Strict(Map)
import qualified Data.Map.Strict as Map
import DBus
import DBus.Client
import System.Directory(doesDirectoryExist, executable, getDirectoryContents, getPermissions... | projedi/hsmenu | src/Main.hs | gpl-2.0 | 3,154 | 0 | 16 | 684 | 1,153 | 583 | 570 | 83 | 3 |
module Geometry.AffineSpaces.Terms where
import Notes
makeDefs [
"point"
, "affine space"
, "affine set"
, "convex set"
, "convex function"
, "concave function"
, "strictly convex function"
, "affine subspace"
, "direction"
, "hyperplane"
]
| NorfairKing/the-notes | src/Geometry/AffineSpaces/Terms.hs | gpl-2.0 | 299 | 0 | 6 | 93 | 46 | 29 | 17 | -1 | -1 |
module Heap where
class Heap h where
empty :: Ord a => h a
isEmpty :: Ord a => h a -> Bool
insert :: Ord a => a -> h a -> h a
merge :: Ord a => h a -> h a -> h a
findMin :: Ord a => h a -> a
deleteMin :: Ord a => h a -> h a
listHeap :: (Ord a, Heap h) => [a] -> h a
listHeap = foldl (\h ... | dservgun/haskell_test_code | src/Heap.hs | gpl-2.0 | 1,252 | 33 | 18 | 448 | 632 | 325 | 307 | 36 | 2 |
{-# LANGUAGE TypeSynonymInstances, Rank2Types #-}
{- |
Module : $Header$
Description : Test functions for MatchingWithDefinitions
Copyright : (c) Ewaryst Schulz, DFKI Bremen 2010
License : similar to LGPL, see HetCATS/LICENSE.txt or LIZENZ.txt
Maintainer : ewaryst.schulz@dfki.de
Stability : experim... | nevrenato/Hets_Fork | HasCASL/InteractiveTests.hs | gpl-2.0 | 18,404 | 0 | 18 | 4,539 | 5,410 | 2,751 | 2,659 | 342 | 6 |
-- | DropDownList widget for presentation mode
{-# LANGUAGE RankNTypes #-}
module Lamdu.GUI.PresentationModeEdit
( make
) where
import qualified Control.Lens as Lens
import Data.Property (Property, pVal)
import qualified GUI.Momentu.Align as Align
import qualified GUI.Momentu.Element as Element
impor... | Peaker/lamdu | src/Lamdu/GUI/PresentationModeEdit.hs | gpl-3.0 | 2,149 | 0 | 16 | 496 | 545 | 308 | 237 | -1 | -1 |
module RunWorkSet
(
-- types
WorkSet
, TestCase(..)
-- functions
, printWorkSet
, filterWorkSet
, mapWorkSet
, getWorkSetGroups
, getWorkSet
) where
import RunAuxiliary
import RunSetup
import RunWork
import qualified Data.Set as Set
import qualified Data.Map.S... | hexenroehrling/hs-scheduler | src/RunWorkSet.hs | gpl-3.0 | 6,816 | 48 | 16 | 1,572 | 1,420 | 787 | 633 | 123 | 2 |
{-# LANGUAGE ScopedTypeVariables , BangPatterns , ParallelListComp #-}
module Data.Graph.Partitioning
()
where
import qualified Data.List as L
import qualified Data.Map as M
import qualified Data.Set as S
import qualified Data.Vector as V
import qualified System.Random as R
import Data.Ord ( comparing )... | malie/multilevel-graph-partitioning | Partitioning.hs | gpl-3.0 | 21,346 | 73 | 24 | 8,422 | 7,272 | 3,805 | 3,467 | 467 | 9 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
module Bantam.Service.View (
view
, serverError
) where
import Bantam.Service.Http
import Bantam.Service.View.Error
import Bantam.Service.View.Frame
import P
import Webship.Wai (ResponseBod... | charleso/bantam | bantam-service/src/Bantam/Service/View.hs | unlicense | 673 | 0 | 9 | 172 | 153 | 91 | 62 | 20 | 1 |
module ParsePhone where
import Control.Applicative
import Text.Trifecta
type NumberingPlanArea = Int -- aka area code
type Exchange = Int
type LineNumber = Int
data PhoneNumber =
PhoneNumber NumberingPlanArea Exchange LineNumber
deriving (Eq, Show)
parsePhone :: Parser PhoneNumber
parsePhone = do
_ <- option... | dmvianna/haskellbook | src/Ch24-ParsePhone.hs | unlicense | 578 | 0 | 10 | 121 | 221 | 108 | 113 | 21 | 1 |
{- Crie um programa que recebe uma lista de inteiros e um
número inteiro positivo i e retorna o i-ésimo elemento da lista.
-}
iesimo :: [Int] -> Int -> Int
iesimo (head:body) index = if index == 1 then head else iesimo (body) (index - 1)
main = do
lista <- getLine
index <- getLine
print (iesimo (read list... | erijonhson/ufcg-plp-e-aplicacoes | praticando_programacao_funcional_parte_2/iesimo.hs | apache-2.0 | 339 | 0 | 11 | 76 | 107 | 55 | 52 | 6 | 2 |
module SparseMap (SparseMap,
empty,
toList,
fromList,
insert,
lookup,
delete,
alter,
adjust,
keys,
all,
filter) where
-- ^... | astro/haskell-torrent | src/SparseMap.hs | bsd-2-clause | 7,995 | 0 | 18 | 3,697 | 2,493 | 1,313 | 1,180 | 158 | 4 |
-- | Module for interacting with cabal installer
module Propellor.Property.Cabal where
import Data.List
import Propellor
import Propellor.Property.File as File
import Propellor.Property.User
import Utility.SafeCommand
type PackageName = String
updated :: UserName ->... | abailly/infra-test | src/Propellor/Property/Cabal.hs | bsd-2-clause | 1,972 | 8 | 13 | 540 | 407 | 218 | 189 | 29 | 1 |
{-# LANGUAGE TemplateHaskell #-}
{-| The Ganeti WConfd core functions.
This module defines all the functions that WConfD exports for
RPC calls. They are in a separate module so that in a later
stage, TemplateHaskell can generate, e.g., the python interface
for those.
-}
{-
Copyright (C) 2013, 2014 Google Inc.
All ... | apyrgio/ganeti | src/Ganeti/WConfd/Core.hs | bsd-2-clause | 14,307 | 0 | 14 | 3,270 | 2,163 | 1,221 | 942 | 187 | 3 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE DefaultSignatures #-}
{-# LANGUAGE FlexibleContexts #-}
module TinyMesh where
import GHC.Generics
import Control.Monad
import Control.Applicative
import Data.C... | mgajda/tinyMesh | TinyMesh.hs | bsd-2-clause | 7,846 | 1 | 17 | 2,705 | 1,621 | 880 | 741 | 165 | 4 |
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE Rank2Types #-}
module Server.SVWorld where
import Control.Lens ((.=), (^.), (-=), (+=), use, preuse, ix, set, zoom, _1, _2, Lens', (&), (.~), (+~), (-~))
import Control.Monad (void, unless, when)
import Dat... | ksaveljev/hake-2 | src/Server/SVWorld.hs | bsd-3-clause | 24,089 | 0 | 28 | 8,836 | 6,837 | 3,485 | 3,352 | -1 | -1 |
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.Raw.EXT.Histogram
-- Copyright : (c) Sven Panne 2015
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- Portability : portable
--
--... | phaazon/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/EXT/Histogram.hs | bsd-3-clause | 1,281 | 0 | 4 | 154 | 115 | 84 | 31 | 27 | 0 |
{-# OPTIONS_GHC -fno-warn-missing-signatures #-}
-----------------------------------------------------------------------------
-- |
-- Module : XMonad.Config.Desktop
-- Description : Core settings for interfacing with desktop environments.
-- Copyright : (c) Spencer Janssen <spencerjanssen@gmail.com>
-- Lice... | xmonad/xmonad-contrib | XMonad/Config/Desktop.hs | bsd-3-clause | 6,652 | 0 | 13 | 1,293 | 395 | 280 | 115 | 21 | 1 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE MultiParamTypeClasses #-}
module Ivory.Language.CArray where
import Ivory.Language.Area
impo... | GaloisInc/ivory | ivory/src/Ivory/Language/CArray.hs | bsd-3-clause | 1,460 | 0 | 14 | 261 | 438 | 235 | 203 | -1 | -1 |
LevelPreds
{ lpredPre =
NameT
{ nameTName = "p_galois'crc32_little'P"
, nameTParams =
[ TyCon "map" [ TyCon "int" [] , TyCon "int" [] ]
, TyCon "map" [ TyCon "addr" [] , TyCon "addr" [] ]
, TyCon "map" [ TyCon "addr" [] , TyCon "int" [] ]
, TyCon "... | GaloisInc/verification-game | web-prover/demo-levels/crc32_little/holes.hs | bsd-3-clause | 7,717 | 0 | 14 | 3,481 | 2,560 | 1,410 | 1,150 | -1 | -1 |
module Errors where
import Control.Monad.Except
data Error
= ErrorString String
| ErrorUnspecified
deriving(Show)
| ClathomasPrime/ImpCore | Impcore/src/Errors.hs | bsd-3-clause | 122 | 0 | 6 | 21 | 29 | 18 | 11 | 6 | 0 |
-- |
-- The data structures (and associated functions) used in the
-- parser. For a normal usage, it should be enough
-- to import only 'Text.Syntactical', not directly this module.
module Text.Syntactical.Data (
SExpr(..), Tree(..), Op(..), Opening(..),
Associativity(..), Hole(..), Part(..), Table, Priority(..),
... | noteed/syntactical | Text/Syntactical/Data.hs | bsd-3-clause | 18,101 | 0 | 16 | 4,361 | 6,594 | 3,419 | 3,175 | 342 | 7 |
{-# LANGUAGE OverloadedStrings #-}
-- | This module provides type-safe access to IO operations.
--
-- It is designed to be imported instead of "System.IO".
-- (It is intended to provide versions of functions from that
-- module which have equivalent functionality but are more
-- typesafe). "System.Path" is a co... | benmos/pathtype | System/Path/IO.hs | bsd-3-clause | 3,714 | 0 | 11 | 669 | 919 | 516 | 403 | 104 | 1 |
module Example where
import Control.Applicative
import Data.Maybe
import Text.XML.Light.Extractors
import Text.XML.Light.Input
main = do
contents <- parseXML <$> getContents
putStrLn $ either showExtractionErr show (extractContents example2 contents)
example1 = foo
example2 = library
-----------------------... | holmisen/xml-extractors | src/Example.hs | bsd-3-clause | 1,367 | 0 | 16 | 376 | 418 | 209 | 209 | 41 | 1 |
import Data.Array.Repa
import Diagrams.Backend.Cairo
import Diagrams.Backend.Cairo.Raster
import Diagrams.Backend.Cairo.Raster.Repa
import Diagrams.Prelude
dia :: Int -> Int -> IO (Diagram Cairo R2)
dia = cairoRepa (\d -> fromFunction d rplus)
rplus :: DIM2 -> CairoColor
rplus (Z :. y :. x) = crgb x y (x*y)
| taruti/diagrams-cairo-raster | example/RepaRaster.hs | bsd-3-clause | 311 | 0 | 9 | 46 | 120 | 67 | 53 | 9 | 1 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
Handles @deriving@ clauses on @data@ declarations.
-}
{-# LANGUAGE CPP #-}
module TcDeriv ( tcDeriving ) where
#include "HsVersions.h"
import HsSyn
import DynFlags
import TcRnMonad
import FamInst
import TcErrors( repo... | urbanslug/ghc | compiler/typecheck/TcDeriv.hs | bsd-3-clause | 92,803 | 909 | 17 | 28,205 | 13,541 | 7,652 | 5,889 | -1 | -1 |
-- | Currently, there is code to execute at runtime as a part of this test
-- suite, as the only interesting part is making sure that the code typechecks.
module Main (main) where
main :: IO ()
main = pure ()
| goldfirere/singletons | singletons/tests/SingletonsTestSuite.hs | bsd-3-clause | 210 | 0 | 6 | 43 | 31 | 18 | 13 | 3 | 1 |
import qualified Zora.Math as ZMath
find_index :: [a] -> (a -> Bool) -> Int -> Int
find_index (x:xs) f i =
if f x
then i
else find_index xs f (succ i)
satisfying_index :: Int
satisfying_index = find_index ZMath.fibs right_length 1
where
right_length :: (Show a) => a -> Bool
right_length x = (length . show ... | bgwines/project-euler | src/solved/problem25.hs | bsd-3-clause | 393 | 6 | 10 | 86 | 174 | 92 | 82 | 13 | 2 |
{-# LANGUAGE CPP,TemplateHaskell,DeriveDataTypeable #-}
module Data.Encoding.ISO88597
(ISO88597(..)) where
import Data.Array ((!),Array)
import Data.Word (Word8)
import Data.Map (Map,lookup,member)
import Data.Encoding.Base
import Prelude hiding (lookup)
import Control.OldException (throwDyn)
import Data.Typeable
da... | abuiles/turbinado-blog | tmp/dependencies/encoding-0.4.1/Data/Encoding/ISO88597.hs | bsd-3-clause | 804 | 2 | 14 | 108 | 250 | 140 | 110 | 21 | 1 |
module Code29_Plan3 where
import Code28
boxall :: [[a]] -> [a]
boxall = boxall1
jcode :: Int -> [Int]
jcode n = code (0,n)
bumpBy :: Int -> [Int] -> [Int]
bumpBy _ [] = []
bumpBy k [a] = [a+k]
bumpBy k (a:b:as) = (a+k) : b : bumpBy k as
bumpDn :: (Int, Int) -> [... | sampou-org/pfad | Code/Code29_Plan3.hs | bsd-3-clause | 710 | 0 | 8 | 239 | 411 | 234 | 177 | 20 | 2 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE CPP #-}
#if __GLASGO... | Lainepress/easy | Text/RE/Types/SearchReplace.hs | bsd-3-clause | 998 | 0 | 9 | 268 | 113 | 71 | 42 | 24 | 0 |
{-# LANGUAGE OverloadedStrings #-}
{-|
Module : Client.Network.Connect
Description : Interface to the connection package
Copyright : (c) Eric Mertens, 2016
License : ISC
Maintainer : emertens@gmail.com
This module is responsible for creating 'Connection' values
for a particular server as specified by a 'S... | glguy/irc-core | src/Client/Network/Connect.hs | isc | 2,415 | 0 | 13 | 584 | 485 | 257 | 228 | 50 | 4 |
module Data.Wright.RGB.Model.SRGB (sRGB) where
import Data.Wright.Types (Model(..), Primary(..), Gamma(..))
import Data.Wright.CIE.Illuminant.D65 (d65)
sRGB :: Model
sRGB = d65
{ gamma = SRGB
, red = Primary 0.6400 0.3300 0.212656
, green = Primary 0.3000 0.6000 0.715158
, blue = Primary 0.1500 0.0600 0.07... | fmap/wright | src/Data/Wright/RGB/Model/SRGB.hs | mit | 328 | 0 | 7 | 58 | 113 | 71 | 42 | 9 | 1 |
module Cardano.Wallet.Kernel.Submission.Worker (
tickSubmissionLayer
) where
import Universum
import Control.Concurrent (threadDelay)
import Formatting (sformat, (%))
import qualified Formatting as F
import Pos.Util.Wlog (Severity (..))
tickSubmissionLayer :: forall ... | input-output-hk/pos-haskell-prototype | wallet/src/Cardano/Wallet/Kernel/Submission/Worker.hs | mit | 1,788 | 0 | 13 | 596 | 248 | 142 | 106 | -1 | -1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
module Coinbase.Exchange.MarketData
( getProducts
... | AndrewRademacher/coinbase-exchange | src/Coinbase/Exchange/MarketData.hs | mit | 4,398 | 0 | 15 | 1,170 | 1,096 | 588 | 508 | 73 | 4 |
module Index (makeIndex) where
import Control.Applicative
import Control.Monad
import Data.IORef
import Data.List
import Data.Time
import Data.Time.Clock.POSIX
import Database.HDBC.Sqlite3
import Mail
import Msg
import Param
import Sql
import System.EasyFile
import Text.Regex.Posix
-----------------------------------... | zcwj/emacs | lisps/mew/bin/hs/Index.hs | gpl-3.0 | 7,430 | 0 | 21 | 2,575 | 2,145 | 1,055 | 1,090 | 187 | 6 |
module GlossRunner
(
runWithGloss
) where
import Data.IORef
import System.Random
import FRP.BearRiver
import qualified Graphics.Gloss as GLO
import Graphics.Gloss.Interface.IO.Animate
import Graphics.Gloss.Interface.IO.Simulate
import Model
import ... | thalerjonathan/phd | thesis/code/concurrent/sugarscape/SugarScapeIO/src/GlossRunner.hs | gpl-3.0 | 2,825 | 0 | 14 | 1,000 | 649 | 332 | 317 | 77 | 2 |
import NoEqImport1
main = A 3 == B 'c'
| roberth/uu-helium | test/make/NoEqImport2.hs | gpl-3.0 | 40 | 0 | 6 | 10 | 19 | 9 | 10 | 2 | 1 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TemplateHaskell #-}
module Main where
------------------------------------------------------------------------------
import Control.Applicative
import Control.Monad.Trans
import ... | govindkrjoshi/snaplet-persistent | example/Site.hs | bsd-3-clause | 2,538 | 0 | 13 | 581 | 546 | 300 | 246 | 57 | 1 |
{-# LANGUAGE MultiWayIf, LambdaCase #-}
-- | Implement DEFLATE (de)compression algorithm
--
-- http://www.ietf.org/rfc/rfc1951.txt
--
-- TODO: use BufferBuilder instead of Seq Word8!
--
-- TODO: the function `putFixedCode` is currently exported to avoid a compiler
-- warning. We should implement the whole compression ... | hsyl20/ViperVM | haskus-system/src/lib/Haskus/Format/Compression/Algorithms/Deflate.hs | bsd-3-clause | 12,696 | 0 | 20 | 3,437 | 3,113 | 1,649 | 1,464 | 193 | 5 |
{-# LANGUAGE DeriveGeneric #-}
module Micro.Types (Tree(..)) where
import GHC.Generics
data Tree = Leaf | Fork Tree Tree
deriving (Eq, Ord, Generic)
| arianvp/binary-serialise-cbor | bench/Micro/Types.hs | bsd-3-clause | 156 | 0 | 6 | 29 | 50 | 30 | 20 | 5 | 0 |
-- |
-- Module : Basement.Compat.Bifunctor
-- License : BSD-style
-- Maintainer : Vincent Hanquez <vincent@snarc.org>
-- Stability : experimental
-- Portability : portable
--
-- A bifunctor is a type constructor that takes
-- two type arguments and is a functor in /both/ arguments. That
-- is, unlike with '... | vincenthz/hs-foundation | basement/Basement/Compat/Bifunctor.hs | bsd-3-clause | 3,071 | 0 | 6 | 825 | 58 | 48 | 10 | 33 | 0 |
module Language.Haskell.GhcMod.Types where
import Control.Monad.Trans.Control (MonadBaseControl)
import Data.List (intercalate)
import qualified Data.Map as M
import Exception (ExceptionMonad)
import MonadUtils (MonadIO)
import PackageConfig (PackageConfig)
-- | A constraint alias (-XConstraintKinds) to make functio... | cabrera/ghc-mod | Language/Haskell/GhcMod/Types.hs | bsd-3-clause | 3,836 | 0 | 9 | 786 | 683 | 434 | 249 | 67 | 1 |
module Atomo.VMT where
import Control.Monad.Cont
import Control.Monad.State
import Control.Monad.Trans
import Atomo.Types
-- | A monad transformer for Atomo's VM which just passes around the VM
-- environment.
type VMT = StateT Env
-- | Execute a VM action inside a VMT monad.
vm :: MonadIO m => VM Value -> VMT m Va... | vito/atomo | src/Atomo/VMT.hs | bsd-3-clause | 904 | 0 | 11 | 188 | 302 | 156 | 146 | 16 | 1 |
-- #hide
module Data.Time.Clock.CTimeval where
#ifndef mingw32_HOST_OS
-- All Unix-specific, this
import Foreign.Safe
import Foreign.C
data CTimeval = MkCTimeval CLong CLong
instance Storable CTimeval where
sizeOf _ = (sizeOf (undefined :: CLong)) * 2
alignment _ = alignment (undefined :: CLong)
peek p = do
s ... | jwiegley/ghc-release | libraries/time/Data/Time/Clock/CTimeval.hs | gpl-3.0 | 830 | 0 | 11 | 154 | 279 | 140 | 139 | 19 | 1 |
module Dotnet.System.IFormatProvider where
import Dotnet
import Dotnet.System.Object
data IFormatProvider_ a
type IFormatProvider a = Dotnet.System.Object.Object (IFormatProvider_ a)
| FranklinChen/Hugs | dotnet/lib/Dotnet/System/IFormatProvider.hs | bsd-3-clause | 186 | 0 | 7 | 20 | 40 | 26 | 14 | -1 | -1 |
--
-- The IEnumerator interface
--
module Dotnet.System.Collections.IEnumerator where
import Dotnet
import qualified Dotnet.System.Object
data IEnumerator_ a
type IEnumerator a = Object (IEnumerator_ a)
-- ToDo: make this type-safe.
current :: Dotnet.System.Object.Object a -> IO (Dotnet.System.Object.Object b)
cur... | alekar/hugs | dotnet/lib/Dotnet/System/Collections/IEnumerator.hs | bsd-3-clause | 513 | 0 | 9 | 74 | 147 | 84 | 63 | -1 | -1 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TemplateHaskell #-}
-- | Utilities for running stack commands.
module Stack.Runners
( withGlobalConfigAndLock
, withConfigAndLock
... | anton-dessiatov/stack | src/Stack/Runners.hs | bsd-3-clause | 9,656 | 98 | 18 | 3,095 | 1,855 | 965 | 890 | 192 | 3 |
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd">
<helpset version="2.0" xml:lang="ar-SA">
<title>Plug-n-Hack | ZAP Extension</title>
<maps>
<homeID>top</homeID>
<mapref ... | kingthorin/zap-extensions | addOns/plugnhack/src/main/javahelp/org/zaproxy/zap/extension/plugnhack/resources/help_ar_SA/helpset_ar_SA.hs | apache-2.0 | 972 | 85 | 53 | 158 | 400 | 211 | 189 | -1 | -1 |
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
module T16326_Fail5 where
isJust :: Maybe a -> Bool
isJust (Nothing :: forall a -> Maybe a) = False
isJust (Just _) = True
| sdiehl/ghc | testsuite/tests/dependent/should_fail/T16326_Fail5.hs | bsd-3-clause | 240 | 0 | 9 | 61 | 56 | 31 | 25 | -1 | -1 |
module Main (main) where
data T = MkT !Bool
f :: T -> Bool
f _ = False
{-# NOINLINE f #-}
{-# RULES "non-det" [1] forall x. f (MkT x) = x #-}
main :: IO ()
main = print (f (MkT True))
-- Prints `True` if the rule fires, or `False` is the wrapper for `MkT` inlines
-- in phase 2, preventing the rule from being trigge... | sdiehl/ghc | testsuite/tests/simplCore/should_run/T15840.hs | bsd-3-clause | 336 | 0 | 9 | 76 | 70 | 39 | 31 | 10 | 1 |
module FunIn2 where
main :: Int -> Int
main
= \ x ->
case x of
1 -> 1 + (main 0)
0 -> ((1 + 2) + 3)
addthree :: Int -> Int -> Int -> Int
addthree a b c = (a + b) + c
| kmate/HaRe | old/testing/unfoldDef/FunIn2_AstOut.hs | bsd-3-clause | 188 | 2 | 12 | 70 | 105 | 57 | 48 | 9 | 2 |
module Distribution.Client.Dependency.Modular.Version
( Ver
, VR
, anyVR
, checkVR
, eqVR
, showVer
, showVR
, simplifyVR
, (.&&.)
, (.||.)
) where
import qualified Distribution.Version as CV -- from Cabal
import Distribution.Text -- from Cabal
-- | Preliminary type for ver... | tolysz/prepare-ghcjs | spec-lts8/cabal/cabal-install/Distribution/Client/Dependency/Modular/Version.hs | bsd-3-clause | 1,148 | 0 | 6 | 242 | 229 | 146 | 83 | 31 | 1 |
{-# LANGUAGE ScopedTypeVariables, ExistentialQuantification, MultiParamTypeClasses #-}
{-# OPTIONS_GHC -fno-warn-name-shadowing #-}
-- | This module defines implementations of syntax-awareness drivers.
module Yi.Syntax.Driver where
import Data.Map (Map)
import qualified Data.Map as M (Map, as... | siddhanathan/yi | yi-core/src/Yi/Syntax/Driver.hs | gpl-2.0 | 2,896 | 0 | 15 | 954 | 912 | 498 | 414 | 48 | 3 |
import Test.Cabal.Prelude
-- Test that Paths module is generated and available for executables.
main = setupAndCabalTest $ setup_build []
| themoritz/cabal | cabal-testsuite/PackageTests/PathsModule/Executable/setup.test.hs | bsd-3-clause | 139 | 0 | 7 | 20 | 22 | 12 | 10 | 2 | 1 |
{-# LANGUAGE TupleSections #-}
-- |Vectorise variables and literals.
module Vectorise.Var
( vectBndr
, vectBndrNew
, vectBndrIn
, vectBndrNewIn
, vectBndrsIn
, vectVar
, vectConst
)
where
import Vectorise.Utils
import Vectorise.Monad
import Vectorise.Env
import Vectorise.Vect
import Vectorise.Type.T... | wxwxwwxxx/ghc | compiler/vectorise/Vectorise/Var.hs | bsd-3-clause | 2,740 | 0 | 12 | 610 | 684 | 361 | 323 | 62 | 2 |
module TH_unresolvedInfix_Lib where
import Language.Haskell.TH
import Language.Haskell.TH.Lib
import Language.Haskell.TH.Quote
infixl 6 :+
infixl 7 :*
data Tree = N
| Tree :+ Tree
| Tree :* Tree
-- custom instance, including redundant parentheses
instance Show Tree where
show N = "N"
show (a :+ b) = "(" +... | urbanslug/ghc | testsuite/tests/th/TH_unresolvedInfix_Lib.hs | bsd-3-clause | 2,085 | 0 | 15 | 509 | 905 | 485 | 420 | -1 | -1 |
module Utils.Common where
etcDir = "/etc/netm/" -- каталог конфигов пользователя
statusFile = "/var/lib/netm/status" -- имена работающих соединений
hierarchyFile = "/var/lib/netm/hierarchy" -- иерархния работающих соединений
type Abbr = String -- сокращение имени конфига, например n/w
ty... | kahless/netm | src/Cmd/Utils/Common.hs | mit | 862 | 0 | 6 | 183 | 107 | 71 | 36 | 18 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE RecordWildCards #-}
module Warp.LetsEncrypt
( LetsEncryptSettings(..)
, runLetsEncrypt
, ConsulSettings(..)
) where
import ClassyPrelude.Conduit
import Leader
import Leader.Consul
import Networ... | snoyberg/warp-letsencrypt | src/Warp/LetsEncrypt.hs | mit | 6,681 | 2 | 24 | 1,665 | 1,867 | 938 | 929 | 178 | 7 |
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-}
module Language.Brainfuck.Py2Bf.Bf
( Bf (..)
, Bfcode (..)
, Bfpointer
) where
import Data.List (intercalate)
import Codec.Binary.UTF8.String (decode)
import Language.Brainfuck.Py2Bf.Bfprim
class Bf a where
convert :: a -> Bfcode
runIO :: a -> IO ()... | itchyny/py2bf.hs | Language/Brainfuck/Py2Bf/Bf.hs | mit | 1,668 | 0 | 12 | 399 | 697 | 379 | 318 | 48 | 1 |
{-# LANGUAGE DeriveDataTypeable, FlexibleContexts #-}
{- | This module defines functions and data structures that allow one
to analyze ASTs. The results of such analysis might be useful for
generating code for a proof assistant, for example.
For each metavariable and nonterminal root, there is an associated... | plclub/lngen | src/ASTAnalysis.hs | mit | 20,171 | 0 | 15 | 5,881 | 4,353 | 2,302 | 2,051 | 260 | 7 |
{-# LANGUAGE OverloadedStrings #-}
module System.Mesos.Raw.Resource where
import System.Mesos.Internal
import System.Mesos.Raw.Value
type ResourcePtr = Ptr Resource
foreign import ccall unsafe "ext/types.h toResource" c_toResource
:: Ptr CChar
-> CInt
-> ValuePtr
-> Ptr CChar
-> CInt
-... | jhedev/hs-mesos | src/System/Mesos/Raw/Resource.hs | mit | 1,437 | 0 | 13 | 360 | 525 | 260 | 265 | 46 | 0 |
module GHCJS.DOM.SVGFEImageElement (
) where
| manyoo/ghcjs-dom | ghcjs-dom-webkit/src/GHCJS/DOM/SVGFEImageElement.hs | mit | 47 | 0 | 3 | 7 | 10 | 7 | 3 | 1 | 0 |
module Labyrinth.Factory (
createNewBoard,
createNewGame,
allColors,
allTreasures,
allStartingPositions,
isStartingPosition,
positionToIndex,
indexToPosition,
tileToFreeTile,
freeTileToTile
)
where
{-|
The factory is responsible for starting a completely new game.
It draws a new board and distr... | amoerie/labyrinth | Labyrinth/Factory.hs | mit | 7,003 | 0 | 15 | 1,360 | 1,847 | 1,020 | 827 | 123 | 1 |
module Main where
-- 어떤 아이가 n개의 계단을 오른다. 한 번에 1계단 오르기도 하고, 2계단이나 3계단을 오르기도 한다. 계단을 오르는 방법이 몇 가지가 있는지 계산하는 메서드를 구현하라. (추가로, 시간복잡도는 얼마인지 생각해보자)
-- f(N) = f(N - 1) + f(N - 2) + f(N - 3)
solution :: Int -> Int
solution 0 = 1
solution 1 = 1
solution n = solution(n - 1) + solution(n - 2) + solution(n - 3)
main :: IO()
mai... | funfunStudy/algorithm | haskell/src/main/haskell/triplestep/Main.hs | mit | 533 | 0 | 9 | 90 | 106 | 56 | 50 | 8 | 1 |
{-# LANGUAGE ScopedTypeVariables #-}
module TestZelus where
import Test.Tasty
import Test.Tasty.HUnit
import Test.Tasty.QuickCheck
import Test.QuickCheck
import Test.QuickCheck.Poly
import Zelus
tests :: TestTree
tests = testGroup "Zelus"
[ testProperty "Pre followed by override equals delay" prop_PreFbyDelay
, ... | koengit/cyphy | test/TestZelus.hs | mit | 1,273 | 0 | 14 | 237 | 425 | 221 | 204 | 28 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.